JavaScript

{dialog.object}frameOpenStateChange Method

Syntax

{dialog.object}.frameOpenStateChange(frameId, state);

Arguments

frameIdstring

The ID of the frame control.

statestring

The frame state. Can be 'open', 'closed', or 'toggle'.

Description

Sets the open or closed state of a modern frame.

Discussion

The {dialog.object}.frameOpenStateChange() method sets the open state for a modern frame control. It can be used to open, close, or toggle the current state of the frame.

A modern frame is a frame with its Frame type property set to 'Modern'. A modern frame can be configure to display an show/hide button which is used to show or hide the contents of the frame, as shown below.

images/modernFrameOpen.png
The frame is open.

The {dialog.object}.frameOpenStateChange() method can only be used with a modern frame that has a show/hide button. The JavaScript below can be used to close the frame shown above:

var frameId = 'FRAME_1';
var frameState = 'closed';

{dialog.object}.frameOpenStateChange(frameId, frameState);
images/modernFrameClosed.png
The frame is closed after running the JavaScript.

See Also